import java.util.Scanner;

public class h_14 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入年、月、日：");
        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();
        int flag = 0;
        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
            flag = 1;
        else
            flag = 0;

        switch (month - 1) {
            case 11:
                day += 30;
            case 10:
                day += 31;
            case 9:
                day += 30;
            case 8:
                day += 31;
            case 7:
                day += 31;
            case 6:
                day += 30;
            case 5:
                day += 31;
            case 4:
                day += 30;
            case 3:
                day += 31;
            case 2:
                day += 28 + flag;
            case 1:
                day += 31;
            case 0:
                day += 0;
                break;
            default:
                System.out.println("请输入正确的月份。");
                break;
        }

        System.out.println("这一天是这一年的第" + day + "天");
    }
}
